<ion-header>
  <ion-navbar>
    <ion-title>设备管理</ion-title>
  </ion-navbar>
</ion-header>
<ion-content>
  <div class="userdevicebox">
    <div class="device-item" *ngFor="let deviceName of userProvider.deviceList">
      <div class="item-img-box">
        <img class="item-img" src="assets/img/devices/{{deviceProvider.devices[deviceName].config.image}}" onError="this.src='assets/img/devices/unknown.png'" />
        <img *ngIf="deviceProvider.devices[deviceName].config.mode=='ble'" class="mode" src="assets/img/icon/ble.png" />
        <img *ngIf="deviceProvider.devices[deviceName].config.mode=='net'" class="mode" src="assets/img/icon/wifi.png" />
        <img *ngIf="deviceProvider.devices[deviceName].config.mode=='mqtt'" class="mode" src="assets/img/icon/mqtt.png" />
      </div>
      <div>
        <div class="name">{{deviceProvider.devices[deviceName].config.customName}}</div>
        <div class="mac">{{deviceName}}</div>
      </div>
      <button ion-button clear item-end (click)="gotoSettingsPage(deviceProvider.devices[deviceName])">设置</button>
    </div>
  </div>
</ion-content>